#!/bin/bash
#监控文件增删改查并显示被更改的文件
#Usage:currentfile.sh /tmp/
inotifypath=/usr/local/inotify/bin/inotifywait
if [ $# -eq 0 ];then
	echo "Usage:`basename ${0}` <monitorpath>"
else
	monitorpath=$1
	$inotifypath -mqr --timefmt '%d/%m/%y-%H:%M' --format '%T %w%f' -e create,delete,modify,attrib $monitorpath
fi	
